Skip to content

feat: add cloud mode with SaaS ingest support#5

Merged
Fabien83560 merged 4 commits into
mainfrom
dev
May 15, 2026
Merged

feat: add cloud mode with SaaS ingest support#5
Fabien83560 merged 4 commits into
mainfrom
dev

Conversation

@Fabien83560
Copy link
Copy Markdown
Member

Context

Adds cloud mode to the SDK, allowing metrics to be sent to the APIForge
SaaS ingest endpoint instead of being stored locally.

Changes

  • Add CloudTransport — HTTP POST to /ingest with circuit breaker (5 failures → 60s pause)
  • Add lat_avg metric to aggregator flush output
  • Local mode unchanged — SQLite + embedded dashboard still work as before
  • Bump version to 2.0.0

How to test

Pass cloudUrl and apiKey to the middleware instead of dbPath:

  • Node.js: apiforge({ cloudUrl: '...', apiKey: 'af_...' })
  • Python: ApiForgeMiddleware(app, cloud_url='...', api_key='af_...')

Checklist

  • Tests added / updated
  • No breaking change on local mode
  • Reviewed locally

datetime.isoformat() produces "+00:00" offset which is rejected by
z.string().datetime() — use strftime to always emit the Z suffix.
Remove mode="local" usage and update test_invalid_mode_raises to
test_partial_cloud_config_raises, reflecting the new cloud_url/api_key API.
@Fabien83560 Fabien83560 merged commit 121cef9 into main May 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant